#pragma once
#include "SOCK_Acceptor.h"
#include "reactor.h"
#include "EventHandler.h"
#include "EventDemultiplex.h"

namespace Network
{
	class SelectReactor : Reactor {
	protected: 
		EventDemultiplex* demultiplexer;
		HandlerMap* handlers;

	public:
		SelectReactor(EventDemultiplex* _demultiplexer);
		~SelectReactor();

		void register_handler(EventHandler *eventHandler);
		void handle_events();
		void remove_handler(EventHandler *eventHandler);
	};
}